function setOpacity(element, value)
{
	var opType = getOpacityType();
	if (typeof element == 'string')
	{
		element = document.getElementById(element);
	}
	if (!element || !opType)
	{
		return false;
	}
	if (opType == 'filter')
	{
		value *= 100;
		var alpha = element.filters['DXImageTransform.Microsoft.alpha'] || element.filters.alpha;
		if (alpha)
		{
			alpha.opacity = value;
		}
		else
		{
			element.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity=" + value + ")";
		}
	}
	else
	{
		element.style[opType] = value;
	}
	return true;
}

function getOpacityType()
{
	if (typeof document.body.style.opacity == 'string')
	{
		return 'opacity';
	}
	else if (typeof document.body.style.MozOpacity == 'string')
	{
		return 'MozOpacity';
	}
	else if (typeof document.body.style.KhtmlOpacity == 'string')
	{
		return 'KhtmlOpacity';
	}
	else if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1] >= 5.5)
	{
		return 'filter';
	}
	return false;
}